Skip to content

fix(chrome-extension): Remove Origin from API mutation request headers - #3363

Merged
LekoArts merged 4 commits into
mainfrom
chrome-ext/fix-mutation-headers
May 13, 2024
Merged

fix(chrome-extension): Remove Origin from API mutation request headers#3363
LekoArts merged 4 commits into
mainfrom
chrome-ext/fix-mutation-headers

Conversation

@tmilewski

@tmilewski tmilewski commented May 10, 2024

Copy link
Copy Markdown
Member

Description

Mutation requests (think: sign out) would fail as the API doesn't allow for origin and authorization to be set at the same time.

Fixes SDK-1736

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@tmilewski tmilewski self-assigned this May 10, 2024
@changeset-bot

changeset-bot Bot commented May 10, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0def720

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clerk/chrome-extension Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tmilewski

Copy link
Copy Markdown
Member Author

!snapshot

@clerk-cookie

Copy link
Copy Markdown
Collaborator

Hey @tmilewski - the snapshot version command generated the following package versions:

Package Version
@clerk/chrome-extension 1.0.8-snapshot.v7aec5a2
@clerk/clerk-js 5.2.4-snapshot.v7aec5a2
@clerk/clerk-expo 1.0.8-snapshot.v7aec5a2
gatsby-plugin-clerk 5.0.0-beta.45

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/chrome-extension

npm i @clerk/chrome-extension@1.0.8-snapshot.v7aec5a2 --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.2.4-snapshot.v7aec5a2 --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@1.0.8-snapshot.v7aec5a2 --save-exact

gatsby-plugin-clerk

npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact

@tmilewski
tmilewski marked this pull request as ready for review May 10, 2024 14:52
@tmilewski
tmilewski requested a review from royanger May 10, 2024 15:08

@royanger royanger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The snapshot resolved the errors I was seeing.

@LekoArts LekoArts changed the title fix(chrome-extension): Remove Origin from API mutation request headers SDK-1736 fix(chrome-extension): Remove Origin from API mutation request headers May 13, 2024
@LekoArts
LekoArts enabled auto-merge (squash) May 13, 2024 06:57
@LekoArts
LekoArts merged commit 7540b05 into main May 13, 2024
@LekoArts
LekoArts deleted the chrome-ext/fix-mutation-headers branch May 13, 2024 07:03
@clerk-cookie clerk-cookie mentioned this pull request May 13, 2024
@dimkl

dimkl commented May 13, 2024

Copy link
Copy Markdown
Contributor

@tmilewski, @royanger Why is the case only for mutation requests? What is the error making the requests fail?
Did you have the allowed_origins setup for the instance?

@tmilewski

Copy link
Copy Markdown
Member Author

@dimkl The long-and-short of it is that it was only happening for mutation requests, and yes allowed_origins was set up.

After a bit of testing it was determined that while allowed_origins was set up, the issue was more that the id of the extension had changed, likely with an uninstall/reinstall without a stable/unique id.

This, ultimately, wound up becoming an artifact of testing and had no effect on the end result. As such it didn't need to be approved/merged.

tmilewski added a commit that referenced this pull request May 13, 2024
…t headers" (#3375)

* Revert "fix(chrome-extension): Remove Origin from API mutation request header…"

This reverts commit 7540b05.

* chore(chrome-extension): Revert #3363
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants